import React from 'react';


import './index.less';

import PersonRefer from '../../../../../../public/components/PersonRefer';

import {base} from 'nc-lightapp-front';

import {
    getBusinessInfo
} from 'nc-lightapp-front';

let businessInfo = getBusinessInfo() || {};

const {
    NCButton
} = base;

export default (props) => {

    return (
        <div className="batch-add-selectman">
            <div className="batch-add-selectman-condition-wrapper">
                <div
                    style={{
                        float: 'left'
                    }}
                >
                    <PersonRefer 
                        refcode="hrhi/refer/hiref/PsnjobRefTreeGridRef/index"
                        clickContainer={
                            <NCButton>
                                {props.language['gx6008-000060']/** 参照选择 */}
                            </NCButton>
                        }
                        isMultiSelectedEnabled={true}
                        queryCondition={() => {
                            return {
                                pk_org: props.pk_org,
                                pk_group: businessInfo.groupId,
                                isIncludeKeyPsnGrp: true,
                                funcPK: '@@@@Z710000000006M7F',
                                GridRefActionExt: "nccloud.web.hryf.dimissionmng.sqlbuilder.DimissionPsnRefSqlBuilder"
                            }
                        }}
                        onChange={props.changePersonRefer}
                        isCacheable={false}
                    />
                </div>
                <div
                    style={{
                        float: 'left'
                    }}
                >
                    <NCButton
                        onClick={props.openBatchAddSearchModal}
                    >
                        {props.language['gx6008-000061']/** 条件选择 */}
                    </NCButton>
                </div>
            </div>
            <div>
                {props.editTable.createEditTable('batchaddlist', {
                    showCheck: true,
                    onSelectedAll: props.selectedAll
                })}
            </div>
        </div>
    );

}